﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucVnHeader.ascx.cs" Inherits="VINETLIFE.Module.ucVnHeader" %>
<script type="text/javascript">
    function updateClock() {
        // Gets the current time
        var now = new Date();

        // Get the hours, minutes and seconds from the current time
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds();

        // Format hours, minutes and seconds
        if (hours < 10) {
            hours = "0" + hours;
        }
        if (minutes < 10) {
            minutes = "0" + minutes;
        }
        if (seconds < 10) {
            seconds = "0" + seconds;
        }

        // Gets the element we want to inject the clock into
        var elem = document.getElementById('clock');

        // Sets the elements inner HTML value to our clock data
        elem.innerHTML = hours + ':' + minutes + ':' + seconds;
    }
</script>
<div class="t-header-wrap-inner">
    <div style="text-align: center; margin: 0 auto;">
        <h1 runat="server" id="h1Title" style="display: none;"></h1>
        <div class="header-top-wrap">
            <div class="header-top">
                <div class="header-top-left">
                    <div class="logo-wrap">
                        <a href="/" title="vinetlife.vn">
                            <h2 class="h2title">Sàn giao dịch thương mại điện tử</h2>
                            <img alt="vinalife.vn" src="/Media/vinetlife-logo.png" title="vinalife.vn" />
                        </a>
                    </div>
                    <div class="location-wrap">
                        <div class="location-inner">
                            <p>Bạn đang ở</p>
                            <div class="location-content">
                                <asp:DropDownList runat="server" ID="ddlLocation" DataTextField="Location" DataValueField="LocationId" AppendDataBoundItems="true" CssClass="ddl-input-1" AutoPostBack="true" OnSelectedIndexChanged="ddlLocation_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Text="Toàn quốc"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="header-top-right">
                    <div class="header-top-info">
                        <div class="header-tranfer">
                            <div id="transferFree">
                                <a href="#">GIAO NHẬN MIỄN PHÍ</a>
                            </div>
                        </div>
                        <div class="header-hotline">
                            <div id="support">
                                <a href="#">TIẾT KIỆM MUA SẮM</a>
                            </div>
                        </div>
                    </div>
                    <div class="header-top-customer">
                        <img src="/images/vinetlife/phone.png" alt="Call vinetlife.vn" style="padding-right: 5px;">
                        <span class="span-hotline">Hotline:
                    <asp:Literal runat="server" ID="ltrHotline"></asp:Literal></span>|
                <span class="hv_supportOnline">
                    <a href="#" class="a-hoidap" title="Hỏi đáp Vinetlife">Hỏi đáp</a>
                    <div class="hotline_hover">
                        <table class="help-form">
                            <tbody>
                                <tr>
                                    <td class="FormTD">
                                        <strong>Giải đáp thắc mắc
                                        </strong>
                                    </td>
                                    <td class="ContentTD">
                                        <b>0989 098 098</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormTD">
                                        <strong>Hỗ trợ sản phẩm (Khu vực miền Bắc)
                                        </strong>
                                    </td>
                                    <td class="ContentTD">
                                        <b>0989 098 098</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormTD">
                                        <strong>Hỗ trợ sản phẩm (Khu vực miền Nam)
                                        </strong>
                                    </td>
                                    <td class="ContentTD">
                                        <b>0989 098 098</b>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </span>
                    </div>
                </div>
                <div class="t-cartdetail-wrap" id="tcartdetail" runat="server" visible="false">
                    <a href="/gio-hang/" title="Tới giỏ hàng">
                        <span id="cartNumber">
                            <asp:Literal runat="server" ID="ltrNumber"></asp:Literal></span>
                        <span id="cartCount">
                            <asp:Literal runat="server" ID="ltrTotal"></asp:Literal></span>
                    </a>
                </div>
            </div>
            <div class="header-menu">
                <div class="head_menu">
                    <div class="menu_catePro">
                        <ul id="menu_comm">
                            <li>
                                <a href="javascript:void(0);" class="drop" title="DANH MỤC SẢN PHẨM">DANH MỤC SẢN PHẨM</a>
                                <div class="catMenuDropDown">
                                    <asp:Repeater runat="server" ID="rptMainMenu" OnItemDataBound="rptMainMenu_ItemDataBound">
                                        <ItemTemplate>
                                            <div class='catMenuCol' style='z-index: 999'>
                                                <div class='catMenuBarCaption'>
                                                    <a class="catMenuBarCaptiona" href='/danh-muc-san-pham/<%#FriendlyUrl(Eval("ProductCategoryTitle").ToString())%>-<%#Eval("ProductCategoryId") %>' title='<%#Eval("ProductCategoryTitle") %>'><%#Eval("ProductCategoryTitle") %></a>
                                                </div>
                                                <div class='catMenuBar'>
                                                    <ul>
                                                        <asp:Repeater runat="server" ID="rptMainMenuChild">
                                                            <ItemTemplate>
                                                                <li class='catMenuParent'>
                                                                    <a href='/danh-muc-san-pham/<%#FriendlyUrl(Eval("ProductCategoryTitle").ToString())%>-<%#Eval("ProductCategoryId") %>' title='<%#Eval("ProductCategoryTitle") %>'><%#Eval("ProductCategoryTitle") %></a>
                                                                </li>
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                    </ul>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <%--  <div class='catMenuBar'>
                                    <ul>
                                        <li class='catMenuParent'>
                                            <a href='san-pham/root5/cat81/Do-dung-sinh-hoat.html'>Đồ dùng sinh hoạt</a><ul class='catMenuSub'>

                                                <li><a href='san-pham/cat118/Do-dung-nha-bep-phong-an.html'>Đồ dùng nhà bếp, phòng ăn</a></li>
                                                <li><a href='san-pham/cat117/Do-dien-gia-dung.html'>Đồ điện gia dụng</a></li>
                                                <li><a href='san-pham/cat121/Do-dung-ve-sinh--ca-nhan.html'>Đồ dùng vệ sinh - cá nhân</a></li>
                                                <li><a href='san-pham/cat189/Chat-tay-rua-diet-con-trung.html'>Chất tẩy rửa, diệt côn trùng</a></li>
                                                <li><a href='san-pham/cat188/Cac-loai-do-dung-khac.html'>Các loại đồ dùng khác</a></li>
                                            </ul>
                                        </li>
                                    </ul>
                                </div>--%>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="menu_cardtm">
                        <a href='/doi-tac/' title="Business partner">
                            <h3>BUSINESS PARTNER</h3>
                        </a>
                    </div>
                    <div class="menu_lm">
                        <a href='/voucher-vinetlife/' title="Voucher Vinetlife">
                            <h3>Voucher - VINETLIFE</h3>
                        </a>
                    </div>
                    <div class="header_search">
                        <div class="SearchTop">
                            <div class="block_search">
                                <div class="navsearch">
                                </div>
                                <div class="bgsearch">
                                    <input autocomplete="off" value="" placeholder="Gõ từ khóa để tìm kiếm" name="grname" id="txtSearch" class="textsearch ac_input" onkeypress="return searchEvent(event)" />
                                </div>
                            </div>
                            <div style="float: left">
                                <input type="submit" class="btSearch" value="" id="btnSearch" />
                            </div>
                            <div class="advance_search"><a href='/danh-muc-tin/tin-tuc-vinetlife-31'>Tin tức Vinetlife</a></div>
                        </div>
                        <div class="back_log">
                            <img src='/images/vinetlife/icon_login.png' alt="vinetlife.vn login" />

                            <div class="back_logintop">
                                <div class="logindrop">
                                    <span id="loghome">
                                        <asp:Literal runat="server" ID="ltrLogin" Text="Đăng nhập"></asp:Literal></span>
                                    <div class="login_">
                                        <div class="logcolleft">
                                            <div id="pnlLogin">
                                                <div class="tvnl-login-box">
                                                    <p class="tvnl-login-title">Đăng nhập hệ thống</p>
                                                    <div class="tvnl-login-inner">
                                                        <div class="tvnl-login-row">
                                                            <input type="text" placeholder="Tên đăng nhập" name="UserName" autocomplete="off" id="txtVUsername" value="" class="textIngray" onkeypress="return pressLogin(event)" />
                                                        </div>
                                                        <div class="tvnl-login-row">
                                                            <input type="password" id="txtVPassword" name="p" class="textIngray" autocomplete="off" onkeypress="return pressLogin(event)" />
                                                        </div>
                                                        <div id="trAlert" style="display: none;">
                                                            <span style="color: red; font-style: italic; font-weight: bold; font-size: 11px;">Sai tên đăng nhập hoặc mật khẩu</span>
                                                        </div>
                                                        <div class="tvnl-login-row">
                                                            <div class="tvnl-login-row-l">
                                                                <input type="checkbox" name="ckbsetcookie" id="ckbsetcookie" title="Nhớ mật khẩu" checked="checked" />Nhớ mật khẩu
                                                            </div>
                                                            <div class="tvnl-login-row-r">
                                                                <a class="forgotPass" href="javascript:void(0)">Quên mật khẩu?</a>
                                                            </div>
                                                        </div>
                                                        <div class="tvnl-login-row">
                                                            <input type="submit" class="butsubmit_log" value="Đăng nhập" onclick='Login(); return false;' />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="tvnl-login-inner-bottom">
                                                    <p>Bạn chưa đăng ký tài khoản </p>
                                                    <a href='/dang-ky/'>Đăng ký mới</a>
                                                </div>
                                            </div>
                                            <div id="pnlLogged" style="display: none;">
                                                <div class="t-logged-wrap">
                                                    <div class="t-logged-inner">
                                                        <div class="t-logged-header"></div>
                                                        <p class="t-logged-title">Chào mừng bạn tới website Vinetlife</p>

                                                        <ul class="t-logged-ul">
                                                        <li><a href="/trang-ca-nhan/">Trang cá nhân</a></li>
                                                        <li><a href="/gio-hang/">Đơn hàng</a></li>
                                                        <li>
                                                            <input type="submit" class="t-logout-button" onclick='Logout(); return false;' value="Đăng xuất" />
                                                        </li>
                                                    </ul>
                                                        <p class="t-logged-time">Bây giờ là:<span id="clock"></span></p>
                                                    </div>
                                                    
                                                </div>
                                            </div>
                                            <span id="msgalert" style="color: #000; text-align: left;"></span>
                                        </div>
                                        <%--<div class="clear"></div>
                                <input type="hidden" id="retpage" value="http://www.tavinet.vn/" name="retpage" />
                                <script type="text/javascript">
                                    function setretpage() { var ret = window.location.href; if (ret == null || ret == "") ret = "index.html"; $("#retpage").val(ret); }
                                    setretpage();
                                </script>--%>
                                    </div>
                                </div>
                            </div>
                            <script type="text/javascript">
                                function setretpage() {
                                    var ret = window.location.href;
                                    if (ret == null || ret == "") ret = "index.html";

                                    ret = "/home/login.aspx?retpage=" + ret;

                                    $("#aLoginLink").attr("href", ret);
                                }
                                setretpage();
                            </script>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
